package com.fy.mapper;

import com.fy.commodity.basedto.PageSize;
import com.fy.entity.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xiaocheng
 * @since 2022-06-14
 */
@Mapper
public interface CommodityMapper {
    //商品待审核列表
    List<CommodityList> queryAuditList(PageSize pageSize);

    //商品待审核详情
    CommodityDetails queryAuditDetails(Integer commodityId, Integer shopId);

    //更改审核状态
    void isPass(IsPass isPass);

    //商品列表
    List<CommodityShow> queryCommodity();
    List<CommodityShow> queryCommodityList(Integer shopId);

    //创建商品
    void createCommodity(CommodityCreate commodityCreate);

    //更新商品
    void updateCommodity(CommodityUpdate commodityUpdate);

    //删除商品
    Integer deleteCommodity(Integer shopId, Integer commodityId);

    //规格列表
    List<Category> queryCategoryList();

    //创建规格
    void createCategory(CategoryCreate categoryCreate);

    //更新规格
    void updateCategory(CategoryUpdate categoryUpdate);

    //删除规格
    Integer deleteCategory(Integer categoryId);

    List<Specification> querySpecification(Integer categoryId);

    void createSpecification(SpecificationCreate specificationCreate);

    void updateSpecification(SpecificationUpdate specificationUpdate);

    Integer deleteSpecification(Integer categoryId, Integer specificationId);
}
